package cms.simmytech.config;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

@Component
public class MyPasswordEncoder implements PasswordEncoder {

	Log log = LogFactory.getLog(MyPasswordEncoder.class);
	BCryptPasswordEncoder bean = new BCryptPasswordEncoder();

	@Override
	public String encode(CharSequence arg0) {
		// TODO Auto-generated method stub
		return bean.encode(arg0);
	}

	@Override
	public boolean matches(CharSequence arg0, String arg1) {
		// TODO Auto-generated method stub
		return bean.matches(arg0.toString(), arg1);
	}


}
